#include<stdio.h>
#include<math.h>
int main()
{
    float p,r,d;//每月还款额、月利率、贷款；
    float month;//还清贷款所需的月数
    d=300000;
    p=6000;
    r=0.01;
    month=log(p/(p-d*r))/log(1+r);
    printf(" we need %3.1lf month",month);
}